#include <iostream>
#include <string>
#include <fstream>
#include <vector>


#include "include/source.hpp"
#include "include/errors.hpp"
#include "include/argparse.hpp"

#include "include/preprocessor.hpp"
#include "include/lexer.hpp"


int main(int argc, char *argv[]) {
	arg::ArgParser argparser;

	argparser.addNoneParamArgument(false, "-h"); // help 
	
	argparser.addStringArgument(true, "-s"); // source filename
	argparser.addStringArgument(false, "-o"); // output filename

	argparser.parse(argc, argv);


	std::string sourceFilename = std::dynamic_pointer_cast<arg::StringArgument>(argparser.getArgument("-s"))->getText();
	soulc::Source source(sourceFilename);

	soulc::preprocess(source);

	soulc::Lexer lexer;
	std::vector<std::shared_ptr<soulc::Lexem>> lexems = lexer.lexe(source);

	return 0;
}
